package com.zozo.guanli.web;

public class Test {

    public static void main(String[] args) {
        String sql = "select * from (select count(id) count,'新增'  type from CI_INST t"
                        + " where t.crt_time >sysdate -"
                        + "   TO_NUMBER(TO_CHAR(sysdate, 'D')) + 2"
                        + " and t.crt_time <"
                        + "    sysdate -"
                        + "     TO_NUMBER(to_char(sysdate, 'D')) + 8"
                        + "     union"
                        + " select count(id) count,'修改' type"
                        + "        from CI_INST t"
                        + "       where t.chg_time >"
                        + "            sysdate -"
                        + "             to_number(to_char(sysdate, 'd')) + 2"
                        + "         and t.chg_time <"
                        + "             sysdate -"
                        + "             to_number(to_char(sysdate, 'd')) + 8) order by count desc";
        System.out.println(sql.toString());
    }
}
